package com.hsh.service;

import com.hsh.bean.Admin;
import com.hsh.dao.AdminMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AdminService {

    @Resource
    public AdminMapper adminMapper;

    public int insertAdmin(Admin admin){
        return adminMapper.insert(admin);
    }

    public int updateAdmin(Admin admin){
        return adminMapper.updateByPrimaryKey(admin);
    }

    public List<Admin> login(Admin admin){
        return adminMapper.login(admin);
    }
}
